﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xww.LCV.Model.Graphics {
    ///<summary>表示蛋白质序列的双向字符串链表
    ///每个节点表示一个氨基酸
    /// </summary>
    public class CharSequence : LinkedList<char> {

        /// <summary>用于构建的源蛋白质序列</summary>
        public string Sequence { get; private set; }
        public const char START = '→';
        public const char END = '←';
        /// <summary>用蛋白质序列构建（自动添加开始、结束标志符）</summary>
        public CharSequence(string source) {
            this.AddFirst(START);
            foreach (char aa in source)
                this.AddLast(aa);
            this.AddLast(END);
        }
        public override string ToString() {
            return this.ToString("");
        }
    }
}
